<template>
  <div class="take-number">
    <ul class="top-tab">
      <li
        v-for="(item, index) in items"
        :key="index"
        :class="{ active: item.status == 1 }"
        @click="tabClick(index)"
      >
        {{ item.title }}
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name: "FileTakeNumber",
  components: {},
  data() {
    return {
      tab: null,
      items: [
        { title: "主文件取号", status: 1, id: "a" },
        { title: "文件查询", status: 0, id: "b" },
      ],
    };
  },
  methods: {
    tabClick(index) {
      console.log(index);
    },
  },
};
</script>

<style scoped>
.top-tab {
  padding: 0 !important;
}
.top-tab li {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #eee;
  border-radius: 4px;
}
.active {
  background: rgb(175, 171, 171);
}
</style>
